﻿<Window x:Class="WpfTestApplication.ContextMenuTestWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WpfTestApplication="clr-namespace:WpfTestApplication"
    Title="ContextMenuTestWindow" Height="300" Width="300">
    <Grid>
        <Label Height="28" Margin="12,12,12,0" Name="labelContextMenuClicked" VerticalAlignment="Top">chose entry from contextmenu</Label>
        <ListBox Margin="12,46,12,116" Name="listBox">
            <ListBox.ContextMenu>
                <ContextMenu Name="cm">
                    <MenuItem Header="Copy" ToolTip="Copy simulated" Click="MenuItem_Click_Copy" Name="miCopy" />
                    <MenuItem Header="Paste" ToolTip="Paste simulated" Click="MenuItem_Click_Paste" />
                    <MenuItem Header="Futher" Name="miFurther" >
                        <MenuItem Header="Futher Action 1" Click="MenuItem_Click_Action1" Name="miFurther1" />
                        <MenuItem Header="Futher Action 2" Click="MenuItem_Click_Action2" IsEnabled="False" Name="miFurther2" />
                    </MenuItem>
                    <MenuItem Header="Options" Name="miOptions">
                        <MenuItem Header="Option 1" IsCheckable="True" Click="MenuItem_Click_Option1" Name="miOption1" />
                        <MenuItem Header="Option 2" IsCheckable="True" Click="MenuItem_Click_Option2" />
                    </MenuItem>
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>
    </Grid>

</Window>
